<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
    <title>Login</title>
</head>
<body>
<base href="<%=basePath%>">
<div style="width: 80%; margin:auto;">
    <h1>请登陆</h1>
    <%
        Object error = request.getAttribute("error");
        String msg = "";
        if (error != null) {
            msg = (String) error;
        }
    %>

    <p style="color: red; font-size: large;"><%= msg %></p>
    <form action="user/login" method="post">
        用户名：<input type="text" name="name"/> <br>
        密&nbsp;&nbsp;&nbsp;码：<input type="password" name="password"/> <br>

        <input type="submit" value="登陆">
    </form>
</div>

</body>
</html>
